import {createRouter, createWebHistory} from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      component: () => import('@/views/Manager.vue'),
      redirect: '/home',
      children: [
        { path: 'person', component: () => import('@/views/manager/Person.vue')},
        { path: 'vperson', component: () => import('@/views/manager/VPerson.vue')},
        { path: 'uperson', component: () => import('@/views/manager/UPerson.vue')},
        { path: 'password', component: () => import('@/views/manager/Password.vue')},
        { path: 'home', component: () => import('@/views/manager/Home.vue')},
        { path: 'admin', component: () => import('@/views/manager/Admin.vue')},
        { path: 'volunteer', component: () => import('@/views/manager/Volunteer.vue')},
        { path: 'user', component: () => import('@/views/manager/User.vue')},
        { path: 'notice', component: () => import('@/views/manager/Notice.vue')},
        { path: 'city', component: () => import('@/views/manager/City.vue')},
        { path: 'animal', component: () => import('@/views/manager/Animal.vue')},
        { path: 'help', component: () => import('@/views/manager/Help.vue')},
        { path: 'helper', component: () => import('@/views/manager/Helper.vue')},
        { path: 'adopt', component: () => import('@/views/manager/Adopt.vue')},
        { path: 'apply', component: () => import('@/views/manager/Apply.vue')},
      ]
    },
    { path: '/login', component: () => import('@/views/Login.vue')},
    { path: '/register', component: () => import('@/views/Register.vue')},
  ]
})

export default router
